📒 Notes for Lecture 07: HTML Forms
-
Form Element: Use
<form action="post">
to wrap inputs and controls. -
Text Input:
<input type="text" id="username" name="username" placeholder="Enter Your Name" autofocus>
– “autofocus” places cursor on load. -
Radio Buttons:
<input type="radio" id="male" name="gender" value="male">
and<input type="radio" id="female" name="gender" value="female">
– only one can be selected per “name”. -
Checkbox:
<input type="checkbox" id="subscribe" name="subscribe" value="yes">
– user can toggle on/off. -
Textarea:
<textarea id="comment" name="comment" rows="4" cols="50"></textarea>
– multiline text input. -
Select Dropdown:
<select name="fruits">
with<option value="apple">Apple</option>
, etc. -
External Link:
<a style="text-decoration: none;" href="https://www.codewithharry.com/tutorial/html-forms/" target="_blank">HTML FORMS</a>
Hinglish: Lecture 07 mein humne <form>
ke andar text input, radio buttons,
checkbox, textarea
aur select dropdown ka use dekha. “autofocus” se form load hote hi cursor text field me rahega.
Radio buttons me ek hi option select hota hai; checkbox toggle hota hai.
Textarea multiline input deta hai, aur select dropdown se ek option choose karte hain.
Ek external link bhi add kiya “HTML FORMS” tutorial ke liye.
💻 Live Code Preview
If the iframe doesn’t load, click here to open Lecture 07 Form Demo in a new tab.